<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>实验3：应用Data对象中的方法输出当前的日期和时间。</title>
</head>
<body>
<div>
    <p id="today"></p>
    <p id="now"></p>
</div>
</body>
<script type="text/javascript">
    /**
     * @Description: 
     * @author 朱志文
     * @date 2021/10/15 
    */
    var date=new Date();
    // console.log(date)
    console.log(date.getUTCDay())
    document.getElementById("today").innerHTML='今天是:'+date.getFullYear()+'年'+date.getMonth()+'月'+date.getDate()+'日'
    document.getElementById('now').innerHTML='现在是:'+date.getHours()+':'+date.getMinutes()+':'+date.getSeconds()
</script>
</html>